package com.netdisk.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 分享实体类
 */
@Data
@TableName("shares")
@ApiModel(value = "分享实体", description = "分享信息")
public class Share {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "分享ID")
    private Integer id;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    /**
     * 文件ID
     */
    @ApiModelProperty(value = "文件ID")
    private Integer fileId;

    /**
     * 分享唯一标识
     */
    @ApiModelProperty(value = "分享唯一标识")
    private String shareId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    /**
     * 过期时间
     */
    @ApiModelProperty(value = "过期时间")
    private LocalDateTime expiresAt;
    
    /**
     * 删除时间
     */
    @TableLogic
    @ApiModelProperty(value = "删除时间")
    private LocalDateTime deletedAt;
} 